package org.sample.net.udp;

import java.net.InetAddress;

public class UDPClientTestA {

    public static void main(String[] args) throws Exception {
        final UDPClient client = new UDPClient("张三", InetAddress.getByName("localhost"));

        new Thread(() -> {
            try {
                client.read();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }).start();

        new Thread(() -> {
            try {
                client.write();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }).start();
    }
}